import http from '@/utils/request'

export function login(name, pass) {
  // 调试
  console.log('login fun')
  return new Promise(resolve=>{
    var res = {data: {token:11111, username: 'aaa'}}
    resolve(res)
  })
  //return http.get('/user/login', { type: 'admin', name, pass })
}

export function getInfo() {
  // 调试
  console.log('login fun')
  return new Promise(resolve=>{
    var res = {data: {roles:[1,2], username: 'aaa'}}
    resolve(res)
  })
  return http.get('/user/info')
}

export function logout() {
  return http.post('/user/logout')
}
